<template>
  <view class="wish-display-page"  v-if="showPage">
    <view class="wish-display-list" :style="navHeight">
      <block v-if="wishList.length>0">
        <view class="list-container" v-for="(item,index) in wishList" :key="index">
          <delSlideLeft :item="item" @delItem="handleDelItem" :data_transit="{index:index,id:item.customerAddressId}" type='special'>
            <view class="list_box">
              <image class="main_img" :src="item.skuImageUrl" @click="skipPdp(item)"></image>
              <view class="list-right">
                <view class="name" :style="{color: item.approveStatus == 'onsale' && item.qty > 0 ? '#000':'#757575'}">{{item.referenceName}}</view>
                <view class="frontName">{{item.frontName}}</view>
                <view class="price_box">
                  <view class="price" :style="{color: item.approveStatus == 'onsale' && item.qty > 0 ? '#000':'#757575'}">
                    <text class="mark">¥</text>
                    <text>{{filterChecked.moneyFormat(item.price, 2)}}</text>
                    <text class="price_tex" v-if="item.approveStatus != 'onsale'">已下架</text>
                    <text class="price_tex" v-if="item.approveStatus == 'onsale' && item.qty <= 0">已售罄</text>
                  </view>
                  <view class="cart_icon" @click='handleAddCart(item)' v-if="!item.isSpecial && item.approveStatus == 'onsale' && item.qty > 0">
                    <image src="https://100000063-1252208446.file.myqcloud.com/images/macallan-remvp/cart_active.png"></image>
                  </view>
                </view>
              </view>
            </view>
          </delSlideLeft>
        </view>
        <view class="bottom_btnarea">
          <view class="btn_style btn_style2" @click="handleAddWishGoods">添加心愿商品</view>
          <view class="btn_style" @click="handleShareWishLists">分享心愿单</view>
        </view>
      </block>
      <block v-if="wishList.length<1">
        <view class="empty_list_box">
          <image class="empty_img" src="https://100000063-1252208446.file.myqcloud.com/images/macallan-remvp/cart/empty_cart_logo4x.png" />
          <view class="empty_text">您尚未添加心愿商品</view>
          <view class="empty_btn"  @click="handleAddWishGoods">去添加</view>
        </view>
      </block>
      <cart-toast v-if="showCartMsg" :cartMessage='cartMessage' :cartStatus='cartStatus' bottom="176rpx"></cart-toast>
    </view>
		<!-- 弱提示 弹窗 -->
		<toast-popup ref="toastPopup" @onToastPopupClick="onToastPopupClick"></toast-popup>
  </view>
</template>
<script module="filterChecked" lang="wxs" src="@/utils/filter.wxs"></script>
<script>
  import tip from '@/utils/tip';
  import api from '@/api/api';
  import delSlideLeft from '@/pages/ay-operate/del_slideLeft.vue'
  import iconMove from './iconMove.vue';
  import {
    CUSTOMER_INFO,
    MERCHANT_INFO,
    USER_SPECICAL_INFO
  } from '@/utils/constant';
  import CartToast from '@/components/common/cartToast.vue';
  import {
  	getSubscribeStatus,
  	getActivitySubscribeTemplate,
  	doSubscribe,
  	setFav,
  } from '@/utils/commonActItems.js'
	import util from '@/utils/util.js';
  export default {
    name: 'wishrDisplayList',
    components: {
      delSlideLeft,
      iconMove,
      CartToast
    },
    data() {
      return {
        wishList: [],
        showPage: false,
        iconSrc: 'https://100000063-1252208446.file.myqcloud.com/images/addWish.png',
        cartMessage:'',       //  加入购物车提示语
        showCartMsg:false,
        cartStatus: false,    //  加入购物车是否成功
				tsApplySkuCodes: [],
				preStartTime: null,
				startTime: null,
				endTime: null,
				nowTime: null
      }
    },
    props: {
      showIcon: {
        typeof: Boolean
      },
      navHeight:{
        typeof:String
      }
    },
    methods: {
			/**
			 * 展示弱提示
			 * @param {Object} msg 文案
			 */
			handleShowTextToast(msg){
				try{
					this.$refs.toastPopup.showToast(msg);
				}catch(e){}
			},
			/**
			 * 若提示按钮点击回调
			 * @param {Object} data.type 类型：confirm确定，cancel取消
			 * @param {Object} data.callBackData 呼气弹窗时传入的数据
			 */
			onToastPopupClick(data){},
      shareTrack(item) {
        this.commitTack(item, {}, 'c_ebmp_wish_list_share_wish_list_product');
        this.trackWishListOperation(item,'分享');
      },
			//	获取服务器时间
			async getServerTime(){
				this.nowTime = new Date().getTime();
				try{
					const json = await api.getServerTime({
						method: "POST",
						query: {},
					});
					if (json.code === 1000 && json.data) {
						let time = JSON.parse(json.data);
						this.nowTime = time.server_date;
					}
				}catch(e){}
			},
      async open(status) {
        try {
          let customerInfo = uni.getStorageSync(CUSTOMER_INFO);
          let merchantInfo = uni.getStorageSync(MERCHANT_INFO);
					await this.handleGetUserTsData(customerInfo, merchantInfo)
					await this.getServerTime();
          const query = {
            store_id: merchantInfo.cloudMerchantStoreId,
            type: 0, // 0心愿单 1意向登记
            page_no: 1,
            page_size: 200
          };
          const res = await api.getWishList({
            method: "GET",
            header: {
              jwt: customerInfo.jwt,
            },
            query
          })
          if (res.code == 1000) {
            const _lists = await this.getOrderItemHDImg(res.data.content, merchantInfo, customerInfo);
            this.wishList = _lists;
          }
          //  神策埋点 心愿单浏览
          if(!status) this.trackWishListView();
        } catch (err) {

        }
        setTimeout(() => {
          this.$parent.handleLoading(false)
          this.showPage = true
        }, 500)
      },
      skipPdp(item) {
        uni.navigateTo({
          url: `/pages/item/item?id=${item.extendedField1}&valueId=${item.extendedField2}`
        })
        setTimeout(() => {
          this.$parent.handleLoading(true)
        }, 200);
      },
      commitTack(item, diffParams, event) {
        let params = {
          c_product_name: item.referenceName,
          c_product_brand: 'THE MACALLAN',
          c_product_price: item.price,
          c_product_volume: item.frontName,
          c_product_id: item.extendedField1,
          c_purchase_type: '',
        }
        let trackParams = Object.assign({}, params, diffParams)
        getApp().commonClTrack(event, trackParams)
      },
      //删除
      handleDelItem: async function(e) {
        let item = e.item;
        let res = await setFav(e.item, 'cancel', '', 0)
        let params = {
          c_link_pagename: '我的心愿单'
        }
        this.commitTack(item, params, 'c_ebmp_wish_list_remove_from_wish_list')
        this.open(true)
        if (!this.showIcon) {
          this.$parent.getIconStatus()
        }
        this.trackWishListOperation(e.item,'删除');
      },

      changeComponent() {
        getApp().commonClTrack('c_ebmp_wish_list_click_add_wish_list', {
          c_pagename: '我的心愿单',
          c_link_pagename: '添加心愿单',
          c_link_path: 'pages/customer/wishList'
        })
        this.$emit('change', 'add')
        this.showPage = false
      },

      // 神策埋点  心愿单浏览
      async trackWishListView(){
        let spuList = [];
        let skuList = [];
        let nameList = [];
        let productQuantity = 0;
        this.wishList.forEach(function(item, index, array) {
          productQuantity += 1;
          nameList.push(item.referenceName)
          skuList.push(item.extendedField2)
          spuList.push(item.extendedField1)
        });
        let _obj = {
          page_name:"我的心愿单",
          product_quantity: productQuantity,
          product_sku_quantity: productQuantity,
          product_spu_list: spuList,
          product_sku_list: skuList,
          product_name_list: nameList,
        };
        this.$commonSensors.lithaTrack.cTrack('WishListView',_obj);
      },
      // 神策埋点  心愿单编辑
      async trackWishListOperation(item, edit_type){
        let _obj = {
          product_purchase_type: ['常规'],
          product_spu_id: item.extendedField1 || "",
          product_sku_id: item.extendedField2 || "",
          product_name: item.referenceName || "",
          product_variant: item.frontName || "",
          edit_type: edit_type
        };
        this.$commonSensors.lithaTrack.cTrack('WishListOperation',_obj);
      },
      //  去添加-  商城页
      handleAddWishGoods(){
        const params={
          page_name:'我的心愿单',
          button_name:'添加心愿商品'
        }
        this.$commonSensors.paramsTrack('WishListClick',params)
        uni.reLaunch({
          url: '/pages/item/categoryNew'
        });
      },
      //  分享心愿单
      async handleShareWishLists(){
        const params={
          page_name:'我的心愿单',
          button_name:'分享心愿单'
        }
        this.$commonSensors.paramsTrack('WishListClick',params)
        let _lists = [];
        uni.showLoading({
          title: "加载中...",
        });
        this.wishList.forEach(item=>{
          _lists.push({
            itemId: item.extendedField1,
            valueId: item.extendedField2
          })
        })
        if(!_lists.length) uni.showToast({ title: '分享心愿单失败，请稍后重试', icon: 'none', mask: true, duration: 1500 });
        const resData = await api.saveShareInfo({
          method: "POST",
          header: {
            'content-type': 'application/json'
          },
          query: {
          	"value": JSON.stringify(_lists)
          }
        });
        uni.hideLoading();
        if(resData && resData.success && resData.data){
          uni.navigateTo({
            url: `/pages/customer/wishListShareImg?shareid=${resData.data}`
          })
        }else{
          uni.showToast({
            title: '分享心愿单失败，请稍后重试',
            icon: 'none',
            mask: true,
            duration: 1500
          });
        }
      },
      /**
       * 查询订单商品的高清大图
       * @param {Object} lists
       * @param {Object} merchantInfo
       */
      async getOrderItemHDImg(lists, merchantInfo, customerInfo){
        const that = this;
        let _lists = JSON.parse(JSON.stringify(lists));
        _lists.forEach(item=>{
          item.qty = 0;
          item.isSpecial = false;
        })
        if(_lists && _lists.length){
          let _itemCodeArr = [];
          for (let i = 0; i < _lists.length; i++) {
            _lists[i] = await that.getDetailsById(customerInfo,merchantInfo,_lists[i]);
            //  暂存itemCode 用于调用批量查询实时库存接口
            if(_lists[i].skuCode) _itemCodeArr.push(_lists[i].skuCode);
          }
          //  查询浏览商品实时库存
          const _availableQty = await that.getAvailableBatchQty(customerInfo, merchantInfo, _itemCodeArr);
          if(_availableQty && _availableQty.length){
            _lists.forEach(item=>{
              if(item.approveStatus == "onsale"){
                _availableQty.forEach(el=>{
                  if(item.skuCode == el.skuCode) item.qty = el.availableQty < 1 ? 0 : el.availableQty;
                })
              }
            })
          }
        }
        return _lists;
      },
      /**
       * 商品数组组装
       * @param {Object} customerInfo
       * @param {Object} merchantInfo
       * @param {Object} itemObj
       */
      async getDetailsById(customerInfo, merchantInfo, itemObj){
        return new Promise(async (resolve, reject)=>{
          try{
            const itemId = itemObj.extendedField1;
            const valueId = itemObj.extendedField2;
            //  查询商品详情
            const _goodsData = await api.goodsDetail({
                query: {
                  merchant_id: merchantInfo.cloudMerchantId,
                  store_id: merchantInfo.cloudMerchantStoreId
                }
              },
              itemId
            );
            if(_goodsData && _goodsData.code == 1000 && _goodsData.data){
              const _tagdata = _goodsData.data;
              itemObj.itemData = _tagdata;
              itemObj.skuCode = (_tagdata?.skus && _tagdata?.skus[0] && _tagdata?.skus[0]?.skuCode) ? _tagdata.skus[0].skuCode : "";
              itemObj.qty = _tagdata?.qty || 0;
              //  查询商品高清大图
              if(_tagdata.resources && _tagdata.resources.length){
                const _obj = _tagdata.resources.find((item)=>item.kind == "hdlp");
                if(_obj && _obj.kind == "hdlp" && _obj.type == "image" && _obj.url) itemObj.skuImageUrl = _obj.url;
              }
              if(_tagdata.itemCustomParameters){
                const _resData = JSON.parse(_tagdata.itemCustomParameters);
                if(_resData.isLuckyDrawItem) itemObj.isSpecial = true;
              }

              //  判断商品是否参加活动
              let jsonData = await api.getDrawInfo({
                method: 'GET',
                query: {
                  store_id: merchantInfo.cloudMerchantStoreId,
                  merchant_id: merchantInfo.cloudMerchantId,
                  customer_id: customerInfo ? customerInfo.customerId : '',
                  item_id: itemId,
                  value_id: valueId
                }
              });
              if(jsonData && jsonData.code === 1000 && jsonData.data) itemObj.isSpecial = true;
              _tagdata.frontProperties.forEach(item=>{
                if(item.frontCustomParameters){
                  const _frontCustomParameters = JSON.parse(item.frontCustomParameters);
                  //特殊购买自定义参数为1时是特殊购买商品isSpecial为true
                  if (_frontCustomParameters['privateSaleMark'] == 1){
										if(this.tsApplySkuCodes.includes(itemObj.skuCode) && this.startTime && this.endTime && this.nowTime > this.startTime && this.nowTime < this.endTime){
											itemObj.isSpecial = false;
										}else{
											itemObj.isSpecial = true;
										}
									}
                  //意向登记
                  if (_frontCustomParameters['intentCheckMark'] == 1) itemObj.isSpecial = true;
                }
                itemObj.approveStatus = item.approveStatus;
              });
            }
            resolve(itemObj)
          }catch(e){
            resolve(itemObj)
          }
        })
      },
      /**
       *  价格策略
       */
      async getPriceRules(itemObj) {
        try{
          let that = this;
          return new Promise(async (resolve, reject) => {
            let customerInfo = uni.getStorageSync(CUSTOMER_INFO);
            let memberDetails = uni.getStorageSync('memberDetails') || getApp().globalData.memberDetails;
            if (!itemObj.valueId) resolve(itemObj);
            const json = await api.getPriceRules({
                query: {
                  group_id: customerInfo.groupId || 0,
                  member_level_id: memberDetails.memberLevelId || 0,
                  member_status: memberDetails.isActive || 'Inactive'
                }
              },
              uni.getStorageSync(MERCHANT_INFO).cloudMerchantId,
              itemObj.itemId,
              itemObj.valueId
            );
            if (json?.code === 1000 && json?.data.length) {
              const res = await that.$commonFunction.priceRulesDeal(json.data, itemObj.itemCode);
              if (res.price !== 0 && itemObj.itemCode == res.itemCode) itemObj.price = res.price
              if (res.rulesArr.length > 0) itemObj.rulesArr = res.rulesArr;
            }
            resolve(itemObj);
          })
        }catch(e){
          resolve(itemObj);
        }
      },
      /**
       *  查询实时库存
       */
      async getAvailableBatchQty(customerInfo, merchantInfo, itemCodeArr){
        if(!itemCodeArr || !itemCodeArr.length) return [];
        const res = await api.getAvailableBatchQty({
          method: "POST",
          header: {
            jwt: customerInfo.jwt,
            'content-type': 'application/json'
          },
          // query: JSON.stringify(itemCodeArr)
          query: itemCodeArr
        }, merchantInfo.cloudMerchantId);
        if(res && res.code === 1000) return res?.data || [];
        return [];
      },
      /**
       * 商品加入购物车功能
       * @param {Object} item
       */
      async handleAddCart(item) {
        if(item.isSpecial) return;
        if(item.itemData && item.approveStatus == "onsale"){
          if(item.qty>0){
            const cartRes = await this.$commonFunction.buildProductsAddCart({
              price: item.itemData.skus[0].price,
			  itemId: item.itemData.itemId,
              valueId: item.itemData.frontProperties[0].valueId,
              itemCode: item.itemData.itemId,
              itemName: item.itemData.itemName,
              qty: 1,
              skuCode: item.itemData.skus[0].skuCode,
              skuId: item.itemData.skus[0].skuId
            });
            this.handleCartToast(cartRes);
            this.buildSrDataTrack(item,"addCartClick");
          }else if(item.qty <= 0){
            this.arrivalNowSubscribe(item.itemData);
          }
        }else{
          if(item.approveStatus != "onsale"){
            this.queryArrivalResult();
          }
        }
      },
      /**
       * 加购提示
       * @param {Object} obj
       */
      async handleCartToast(obj){
				const _arr = ['您动作太快，请慢点哟～', '网络状态不佳，请重试'];
				if(obj.msg && _arr.includes(obj.msg)){
					this.handleShowTextToast(obj.msg)
				}else if(obj.data && obj.data.msg && obj.data.type === 'showToast'){
					this.handleShowTextToast(obj.data.msg)
				}else{
					// if(obj?.success) this.getCartItems();
					this.cartMessage = obj?.msg || "加入购物袋失败";
					this.cartStatus = obj?.success || false;
					this.showCartMsg = true;
					setTimeout(()=>{
						this.showCartMsg = false;
					},3000);
				}
      },
      /**
       * 有数埋点数据组装
       * @param {Object} item
       * @param {Object} type
       */
      async buildSrDataTrack(item, type){
        const _itemData = item.itemData || null;
        if(_itemData){
          const _srParams = {
            skuCodes: [_itemData.itemCode || ""],
            itemName: _itemData.itemName || "",
            outerItemId: _itemData.outerItemId || "",
            frontProperties: _itemData.frontProperties || [],
            itemCode: _itemData.itemCode || "",
            categoryId:  _itemData.categoryId || "",
            skuImageUrl:  _itemData.frontProperties[0].skuImageUrl || ""
          }
          this.$commonUtoolsTrack.tencentYoushuTracking(_srParams, type);
        }
      },
      //  到货提醒订阅通知
      async arrivalNowSubscribe(item) {
      	let that = this
      	let templateId = ['4SfLNnxKf26rpT4GO9w4PrrPzlFR40NBjZdOnXHNq8k'];
      	uni.requestSubscribeMessage({
      		tmplIds: templateId,
      		success(res) {
      			if (res['4SfLNnxKf26rpT4GO9w4PrrPzlFR40NBjZdOnXHNq8k'] == "accept") {
      				that.arrivalNow(item);
      			}
      		},
      		fail(res) {},
      		complete(res) {

      		}
      	});
      },
      async arrivalNow(itemData) {
        const {itemId, frontProperties, itemName, itemCode, skus} = itemData;
      	let that = this;
      	let userSpecialInfo = uni.getStorageSync(USER_SPECICAL_INFO);
      	const accountInfo = uni.getAccountInfoSync();
      	let merchantInfo = uni.getStorageSync('merchantInfo');
      	let customerInfo = uni.getStorageSync(CUSTOMER_INFO) || getApp().globalData.customerInfo;
        const _colorName = frontProperties[0]?.valueName || "";
        const _valueId = frontProperties[0]?.valueId || "";
        if (!_valueId) return;
      	let page = `/pages/item/item?id=${itemId}&valueId=${_valueId}&valueName=${_colorName}`
      	if (customerInfo) {
      		let res = await api.arrivalRemind({
      			method: 'POST',
      			header: {
      				jwt: customerInfo.jwt,
      				appId: accountInfo.miniProgram.appId
      			},
      			query: {
      				frontCode: skus[0]?.skuProperties[0]?.frontCode,
      				frontUrl: page,
      				itemCode: itemCode,
      				itemId: itemId,
      				itemName: frontProperties[0]?.subtitle.split(',').join('') || itemName,
      				mobile: customerInfo.mobile,
      				nickName: customerInfo.nickName,
      				openId: customerInfo.openId,
      				skuCode: skus[0]?.skuCode,
      				storeId: merchantInfo.cloudMerchantStoreId,
      				unionId: customerInfo.unionId || 'unionId',
      				valueId: _valueId,
      				valueName: _colorName
      			},
      		});
      		if (res.code == 1000 || res.code == 200 || res.code == -1003) {
      			this.handleCartToast({success: true, msg:"该商品已售罄，已为您订阅到货提醒"})
      			return true
      		} else {
      			this.handleCartToast({success: false, msg:"到货提醒订阅失败"})
      			return false
      		}
      	}
      },
      //  商品上新通知
      async queryArrivalResult(){
        const that = this;
        const _id = api.environment == 'trial' ? 138 : 218;
        let subscribeStatus = await getSubscribeStatus(_id);
        if (!subscribeStatus) {
          let {
            templateId,
            activitySubscribeName
          } = await getActivitySubscribeTemplate(_id);
          const template = new Array(templateId);
          uni.requestSubscribeMessage({
          	tmplIds: template,
          	success(res) {
          		if (res[template[0]] == "accept") {
          			// 用户允许接收订阅消息
          			doSubscribe(_id).then((res) => {
          				that.handleCartToast({success: true, msg:"该商品已下架，已为您订阅上新通知"});
          			}).catch(e=>{
                  that.handleCartToast({success: false, msg:"上新通知订阅失败"})
                })
          		}
          	},
          	fail(res) {},
          	complete(res) {}
          });
        } else {
          this.handleCartToast({success: true, msg:"该商品已下架，已为您订阅上新通知"});
        }
      },
			//  查询用户ts活动信息
			async handleGetUserTsData(customerInfo, merchantInfo) {
				this.tsApplySkuCodes = [];
				this.preStartTime = null;
				this.startTime = null;
				this.endTime = null;
				let memberDetails = uni.getStorageSync("memberDetails");
				if(!memberDetails) return false;
				const result = await api.getTsByUser({
					header: {
						jwt: customerInfo.jwt,
					},
					method: "GET",
					query: {
						store_id: merchantInfo.cloudMerchantStoreId,
						group_id: customerInfo.groupId,
						member_level_id: memberDetails.memberLevelId,
					},
				});
				if (result.code == 1000 && result.data) {
					this.tsApplySkuCodes = result.data.applySkuCodes || [];
					this.preStartTime = util.formatTimeStamp(result.data.teaserStartTime)
					this.startTime = util.formatTimeStamp(result.data.campaignStartTime)
					this.endTime = util.formatTimeStamp(result.data.campaignEndTime)
				}
			},
    }
  }
</script>

<style lang="scss">

  .wish-display-list {
    height: 100%;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    overflow: auto;
    padding: 8rpx 48rpx 200rpx;
    font-family: FrankNew-Regular,NotoSansSC-Regular;
    .list-container {
      width: 100%;
      height: 288rpx;
      overflow: hidden;
      margin-top: 24rpx;
      .list_box {
        background-color: #fafafa;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        .main_img {
          width: 216rpx;
          height: 288rpx;
        }
        .cart_icon {
          width: 48rpx;
          height: 48rpx;
          display: flex;
          align-items: center;
          image{
            width: 100%;
            height: 100%;
          }
          .share-button {
            position: absolute;
            top: 0;
            bottom: 0;
            width: 100%;
            opacity: 0
          }
          .share {
            width: 28rpx;
            height: 27rpx;
          }
        }

        .list-right {
          width: 406rpx;
          height: 100%;
          .name {
            color: #000;
            width: 100%;
            line-height: 48rpx;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            font-size: 28rpx;
            overflow: hidden;
            line-clamp: 2;
            -webkit-line-clamp: 2;
            text-overflow: ellipsis;
            white-space: normal;
          }
          .frontName {
            color: #757575;
            font-size: 24rpx;
            line-height: 40rpx;
            margin-top: 4rpx;
          }
          .price_box{
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 28rpx;
          }
          .price {
            color: #1A1A1A;
            line-height: 48rpx;
            font-size: 24rpx;
          }
          .mark{
            font-family: NotoSansSC-Regular;
            margin-right: 4rpx;
          }
        }
      }
    }

  }
.bottom_btnarea{
  width:100%;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  left: 0;
  bottom: 0;
  padding: 48rpx 48rpx 64rpx;
  z-index: 19;
}
.btn_style{
  width: 319rpx;
  height: 80rpx;
  border-radius: 40rpx 16rpx 48rpx 40rpx;
  border: 2px solid #000;
  line-height: 72rpx;
  font-size: 28rpx;
  font-family: NotoSansSC-Medium;
  text-align: center;
  background-color: #000;
  color: #fff;
}
.btn_style2{
  background-color: #fff !important;
  color: #000 !important;
}
.empty_list_box{
  margin-top: 256rpx;
}
.empty_img{
  width: 108.38rpx;
  height: 80rpx;
  display: block;
  margin: 0 auto;
}
.empty_text{
  width: 100%;
  line-height: 48rpx;
  text-align: center;
  font-size: 28rpx;
  font-weight: normal;
  font-family: NotoSansSC-Regular;
  margin-top: 80rpx;
}
.empty_btn{
  width: 176rpx;
  height: 80rpx;
  line-height: 80rpx;
  border-radius: 48rpx 16rpx 48rpx 48rpx;
  background-color: #CB171A;
  color: #fff;
  font-size: 28rpx;
  font-weight: 500;
  text-align: center;
  margin: 80rpx auto 0 auto;
  font-family: NotoSansSC-Medium;
}
.price_tex{
  color: #757575;
  margin-left: 16rpx;
}
</style>
